import request from '../utils/request.js'
const Qs = require('qs');

// /adminHome/login 登录
export const loginApi = params => {
  return request({
    url: '/login',
    transformRequest: [function (data) {      //在请求之前对data传参进行格式转换
      data = Qs.stringify(data);
      return data
    }],
    method: 'Post',
    data: params,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  });
};